package Tool;

import javax.swing.*;
import java.awt.*;

public class About_Partner {
    public About_Partner() {
        //创建一个弹框对象
        JDialog jDialog = new JDialog();
        new InitJdialog(jDialog);
        jDialog.setTitle("小组成员");

        //给弹框设置大小
        jDialog.setSize(500, 100);
        //设置容器默认布局
        jDialog.setLayout(new BorderLayout());

        //设置表格
        // 定义表格列名数组
        String[] columnNames = {"","姓名", "班级", "学号"};
        // 定义表格数据数组
        String[][] tableValues = {{"组长","雷永辉","网络232","2023433545221"},{"组员","孙超","网络232","2023433545220"}};
        JTable jtable = new JTable(tableValues,columnNames);

        //创建滚动面板
        JScrollPane pane = new JScrollPane(jtable);
        pane.setBounds(0, 0, 500, 100);

        //把表格添加到弹框当中
        jDialog.getContentPane().add(pane);

        //让弹框显示出来
        jDialog.setVisible(true);
    }
}
